import VueRouter from "vue-router";
import Vue from "vue";
Vue.use(VueRouter)

import Header from '@/erabbit/index'
import Login from '@/erabbit/login/login'
import Home from '@/erabbit/category/category'
import itheima from '@/erabbit/itheima'
import sub  from '@/erabbit/sub'
export default new VueRouter({
    routes: [
        { path: '/Login', component: Login },

        {
            path: '/',
            component: Header,
            redirect: '/home',
            children: [{
                path: '/home',
                component: Home,
            }]
        },
        {
            path: '/itheima/:id',
            component: itheima,
       
        },
        {
            path:'/itheima/sub/:id',
            component:sub
        },
        {
            path:'/produck/:id',
            component:()=>import('@/erabbit/produck/produck')
        },
        {
            path:'/cart',
            component:()=>import('@/erabbit/shoppingCart/shoppingCart')
        },
        

    ]
})
